package com.bfly.mall.order.event;

import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationEvent;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单退款事件
 *
 * @author 长沙商脉科技有限公司
 * @date 2020/12/14 21:42
 */
public class OrderRefundEvent extends ApplicationEvent {
    private final ApplicationContext context;
    private final String orderNo;
    private final Date refundSuccessTime;
    private final BigDecimal refundPrice;

    public OrderRefundEvent(ApplicationContext ctx, String orderNo, Date refundSuccessTime, BigDecimal refundPrice) {
        super(ctx);
        this.context = ctx;
        this.orderNo = orderNo;
        this.refundPrice = refundPrice;
        this.refundSuccessTime = refundSuccessTime;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public Date getRefundSuccessTime() {
        return refundSuccessTime;
    }

    public BigDecimal getRefundPrice() {
        return refundPrice;
    }

    public ApplicationContext getApplicationContext() {
        return this.context;
    }
}
